package com.xmy.dao.Impl;

import com.xmy.dao.AccountDao;
import com.xmy.dao.BaseDao;
import com.xmy.entity.Account;

public class AccountDaoImpl extends BaseDao implements AccountDao {

    @Override
    public int addAccountInfo(Account account) {
        String sql = "INSERT INTO `petshop`.`account` (`aid`, `petid`, `sid`, `typeid`, `mid`, `price`, `time`) VALUES (null, ?,?, ?, ?, ?, CURDATE())";
        Object[] objects = {account.getPetid(),account.getSid(),account.getTypeid(),account.getMid(),account.getPrice()};
        return executeUpdate(sql,objects);
    }
}
